#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
const double esp = 1e-8;

int main()
{
	double d;
	cin >> d;
	double l = 0, r = d;
	if (r < 0)
		swap(l, r);
	if (d > -1 && d < 1)
	{
		l = -1;
		r = 1;
	}
	while (r - l > esp)
	{
		double mid = (l + r) / 2;
		if (mid * mid >= d)
			r = mid;
		else
			l = mid;
	}
	printf("%.6f\n", l);

	return 0;
}
